Jump to content




= expected


  • You cannot reply to this topic
3 replies to this topic

#1 ETHANATOR360

  • Members
  • 423 posts
  • Locationyour hardrive

Posted 07 September 2012 - 01:35 AM

iv just started making a BASIC api iv already hit a problem
code:
function RND(int)
local random = math.random (0,int)
return random
end
post 1 through 3 do not resolve the problem
error code: [string BASIC:1: '=' expected

#2 Noodle

  • Members
  • 989 posts
  • LocationSometime.

Posted 07 September 2012 - 01:41 AM

Lua counts from 1
function RND(int)
random = math.random(1, int)
return random
end
You type
print(RND(5))
EDIT: 750 Post!

#3 ETHANATOR360

  • Members
  • 423 posts
  • Locationyour hardrive

Posted 07 September 2012 - 01:44 AM

derp i forgot to post that the error was on line one and congragulations on your 750 post

#4 Noodle

  • Members
  • 989 posts
  • LocationSometime.

Posted 07 September 2012 - 01:46 AM

View PostETHANATOR360, on 07 September 2012 - 01:44 AM, said:

derp i forgot to post that the error was on line one and congragulations on your 750 post
Thanks! (Especially for posting this so I could achieve my goal)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users